<div id="tab-coupons">
	<table class="table-content" width="100%">
		<tr>
			<td width="5%">
			</td>
			<td width="90%">
				
				<div id="genCouponForm">
					<br />
					<fmt:message key="couponDetail.genCouponsT1" />
					<fmt:message key="couponDetail.couponStyle" />
					:
					<select id="couponStyle" name="couponStyle">
						<option value="1">
							<fmt:message key="couponDetail.couponStyle.number" />
						</option>
						<option value="2">
							<fmt:message key="couponDetail.couponStyle.string" />
						</option>
					</select>
					<fmt:message key="couponDetail.prefix" />
					:
					<var>
						<input type="text" id="prefix" name="prefix" value="" size="8" />
					</var>
					<fmt:message key="couponDetail.genCouponsT2" />
					<var>
						<input type="text" id="quantity" name="quantity" value="1"
							size="8" />
					</var>
					<fmt:message key="couponDetail.genCouponsT3" />

					<input type="button" class="btn2" value="<fmt:message key="couponDetail.genCouponsButton"/>" onclick="return genCoupons();" />
				</div>
				
				<br />
				<br />
				<div id="coupon_message" style="display:none"  class="success_msg"></div>
				<div id="ruleDetail-couponList" class="ruleDetail-couponList"/>


			</td>

			<td width="5%">

			</td>
		</tr>
	</table>

	<fmt:message key="coupon.title" 	var="sendCouponDialogTitle" />
	<fmt:message key="coupon.sendEmail" var="buttonSendEmail"/>
	<div style="display:none">
		<probiz:ui_dialog id="sendCouponDialog"		title="${sendCouponDialogTitle}" width="480" height="250"	buttons="'${buttonSendEmail}':sendCoupon">
			<div id="sendCouponDiv">
				<div  id="sendCouponForm" >
					<table class="com_modi_table" width="100%">
						<tr>
							<th class="label_width_1">
								<StoreAdmin:label key="coupon.firstName" />
							</th>
							<td>
								<input type="input" name="firstName" id="firstName" value="" class="inputtxt" style="width:100px;"/>
							</td>
						</tr>
						<tr>
							<th>
								<StoreAdmin:label key="coupon.email" />(<span class="red">*</span>):
							</th>
							<td>
								<input type="input" name="email" id="email" value="" class="inputtxt" style="width:250px;"/>
							</td>
						</tr>
						<tr>
							<th>
								<StoreAdmin:label key="coupon.couponNo" />
							</th>
							<td>
								<input type="input" name="couponNo" id="couponNo" value="" readonly="true" size="30" style="width:150px;"/>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</probiz:ui_dialog>
	</div>
</div>
<script type="text/javascript"	src="${ctxPath}/scripts/probiz/sales/promoRuleFormCoupons.js?rs=${appConfig.rs}"></script>
<script type="text/javascript">
$j(document).ready(function(){
	applyValidate($("availableCount"),"required,integer,minValue=1");
	<c:if test="${not empty promoRule.promoRuleId}">
		$j("#ruleDetail-couponList").load(__ctxPath+"/sales/coupon.html?promoRule=${promoRule.promoRuleId}&decorator=blank");//凡是用jquery load的方式一定要用blank装饰器
	</c:if>
});


</script>


